package exercise;

public class Coach extends Car {

	private int seatNum;
	
	public Coach(String id, String brand, double price, int seatNum) {
		this.setId(id);
		this.setBrand(brand);
		this.setPricePerDay(price);
		this.seatNum = seatNum;
	}
	
	public double calculate(int days) {
		double total = 0;
		if (days > 0 && days < 3) {
			total = this.getPricePerDay() * days;
		} else if (days >= 3 && days < 7) {
			total = this.getPricePerDay() * days * 0.9;
		} else if (days >= 7 && days < 30) {
			total = this.getPricePerDay() * days * 0.8;
		} else if (days >= 30 && days <150) {
			total = this.getPricePerDay() * days * 0.7;
		} else if (days >= 150) {
			total = this.getPricePerDay() * days * 0.6;
		}
		return total;
	}
}
